<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <link rel="icon" th:href="@{/assert/img/icon.png}" type="image/x-icon">
  <title>佑佑爱学习</title>
  <meta charset="UTF-8">
  <link rel="stylesheet" type="text/css" th:href="@{/assert/css/base.css}">
</head>
<body>

<div style="width: 96%;height: 95%;top:2%; left: 2%;background: rgba(255,255,255,0.85);">
  <div style="height: 30%;">
    <div style="left: 30%;width: 40%;top: 40%">
      <h2 style="width: 70%;height: 80%;left:35%">match point</h2>
    </div>
  </div>
  <div style="height: 50%">
    <div style="left: 30%;width: 40%;height: 46px;">
      <input id="queryData" style="width: 70%;height: 80%" type="text" name="firstname" value="内容">
      <button style="width: 14%;height: 80%" onclick="onSearch()">搜索</button>
    </div>
  </div>
  <div style="height: 25%;width: 40%;left:30% ">
    <div style="width: 20%;　float:left; background: #ffffff;display: inline" th:each="page : ${pages}">
      <a th:text="${page.name}" th:href="${page.url}"/>
    </div>
  </div>
  <div style="height: 5%;width: 40%;left:30% ">
    <a href="https://beian.miit.gov.cn/" target="_blank">备案号</a>
    <a href="https://beian.miit.gov.cn/" target="_blank">陇ICP备2023001092号</a>
  </div>


</div>

</body>
<script type="text/javascript" th:src="@{/assert/js/ajax.js}"></script>
<script type="text/javascript">
  function onSearch() {
    let data = document.getElementById('queryData').value;
    window.location.href = "https://cn.bing.com/search?q=" + data;
  }

    const input = document.getElementById('queryData');
    // 添加键盘按下事件监听器
    input.addEventListener('keydown', function(event) {
      // 如果按下的键是enter键
      if (event.keyCode === 13) {
       onSearch()
      }
    });
</script>
</html>